<?php
	session_start();
	require_once("../db_connect.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet"  href="../../css/admin.css" type="text/css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script>
<script type="text/javascript" src="../../js/jquery.corner.js"></script>
<script type="text/javascript"></script>
<title>管理者画面</title>
</head>
       <body>
		<div id="topmain" >
			<div id="topwaku">カテゴリ管理</div>
				<div id="enpty"></div>
					<div id="topimage"><a href="manager_create.php" >管理者登録</a></div>
					<div id="topimage"><a href="ManagerLogout.php" >ログアウト</a></div>
		</div>
		<div id="leftmain">
			<div id="leftmainwaku">
				<div id="koumoku"><a href="../../manager_index.php" >・管理トップページ</a></div>
				<div id="koumoku"><a href="manage_main_category.php" >・戻る</a></div>
			</div>
		</div>
		<div id="centerup">
		<div id="centerwaku">
			<div id="centertitle">
				<div id="centerchara">新規サブカテゴリ登録</div>
			</div>
			</div>
			<div id="centerinsert">
			<div id="centerinsert2">
<form action="ManagerUpdate.php" method="POST">
<?php
	$manager_id  = htmlspecialchars($_GET['manager_id'],ENT_QUOTES,"UTF-8");

	$sql = "SELECT login_id,family_name,given_name,family_kana,given_kana
			FROM manager
			WHERE manager_id = ?";

	$data = array($manager_id);

	$res =& $db->query($sql, $data);	//SQLを実行して、結果を $res に代入
	if (PEAR::isError($res)) {			//SQLの実行に失敗すればここでエラー文を出力
		die($res->getMessage());
	}
	while ($row =& $res->fetchRow(DB_FETCHMODE_ASSOC)) {?>
	<input type="hidden" name="manager_id" value="<?php echo $manager_id?>" />
	漢字(姓) <input type="text"
		name="Family_Name" value="<?php echo $row['family_name']?>" />(名)<input type="text" name="Given_Name" value="<?php echo $row['given_name']?>" /><br />
	フリガナ(姓) <input type="text" name="Family_Kana" value="<?php echo $row['family_kana']?>" />(名)<input type="text"
		name="Given_Kana" value="<?php echo $row['given_kana']?>" /><br />
	ログインID <input type="text" name="Login_ID" value="<?php echo $row['login_id']?>" style="ime-mode:disabled;" /><br /><hr />
<?php }?>
<input type="submit" value="変更" /></form>
	</div>
</div>
</div>
</body>
</html>

